<div id="loginbox">
{ifuserconnected}
    <h2>Identity</h2>
    {$login}, you are connected.
    <div class="loginbox-links">
        (<a href="{jurl 'jcommunity~login:out'}">Logout</a>,
        <a href="{jurl 'jcommunity~account:show', array('user'=>$login)}">Your account</a>)
    </div>
{else}
    <h2>Connection</h2>
    <div>  
    {form $form, 'jcommunity~login:in'}
        <fieldset>
            <legend>Login</legend>
            
            {ctrl_label 'auth_login'} {ctrl_control 'auth_login'}
            {ctrl_label 'auth_password'} {ctrl_control 'auth_password'}
            
            {if $persistance_ok}
            <div> {ctrl_label 'auth_remember_me'} {ctrl_control 'auth_remember_me'} </div>
            {/if}
            {if $url_return}
            <input type="hidden" name="auth_url_return" value="{$url_return|eschtml}" />
            {/if}
            
        {formsubmit}
        </fieldset>        
    {/form}
        <div class="loginbox-links">
           (<a href="{jurl 'jcommunity~registration:index'}">Register</a>, 
           <a href="{jurl 'jcommunity~password:index'}">Forgotten password</a>)
        </div>
    </div>
{/ifuserconnected}
</div>